/**
 * @file app_oled.h
 * @author Ai-Thinker SeaHi
 * @brief
 * @version 0.1
 * @date 2021-09-13
 *
 * @copyright Copyright (c) 2021
 *
 */
#ifndef APP_OLED_H
#define APP_OLED_H

#include "driver/i2c.h"
#include "oledfont.h"
#include "lwip/apps/sntp.h"
#include "lwip/apps/sntp_opts.h"
 //字体大小
#define SIZE 16

#define OLED_SDA_PIN 4
#define OLED_SCL_PIN 5

#define OLED_ADDRESS 0X3C
#define WRITE_CMD 1
#define WRITE_DATA 0

extern bool OLED_INIT_OK;

void oled_init(void);

void oled_display_ON(void);
void oled_display_OFF(void);
void oled_clear_display(void);
void oled_show_char(uint8_t x, uint8_t y, uint8_t ch);
void oled_show_str(unsigned char x, unsigned char y, char* str);
void oled_display_ch(unsigned char x, unsigned char y, unsigned char N);
void oled_display_image(unsigned char x0, unsigned char y0, unsigned char x1, unsigned char y1, unsigned char* image);

void oled_init_display(void);
void oled_display_task(void* arg);

void oled_display_str_time(unsigned char x, unsigned char y, struct tm timeinfo);
#endif
